package com.dynamictpm.module;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;

/**
 * -----------------------------
 * PackageName： com.dynamictpm
 * ClassName：ExecutorFactory
 * Description：线程池工厂
 *
 * @author：it-yml CreateTime：2023-07-01
 * -----------------------------
 */
public class ExecutorFactory {
    /**
     * Thread pool management tool.
     */
    public static final class Managed {

        private static final String DEFAULT_NAMESPACE = "dynamic.thread-pool";



        public static ScheduledExecutorService newSingleScheduledExecutorService(String group, ThreadFactory threadFactory) {
            ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1, threadFactory);

            return executorService;
        }
    }
}
